Skip to content

Conversation

@myieye
Copy link
Collaborator

@myieye myieye commented Oct 29, 2025

This excludes e.g. Reversel index parts of speech.

@github-actions github-actions bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Oct 29, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 29, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

GetPartsOfSpeech() now reads parts of speech from Cache.LangProject.AllPartsOfSpeech (cast to IPartOfSpeech) instead of PartOfSpeechRepository.AllInstances(); test teardown DisposeAsync now deletes PartOfSpeech entries from both FwDataApi and CrdtApi.

Changes

Cohort / File(s) Change Summary
API data source change
backend/FwLite/FwDataMiniLcmBridge/Api/FwDataMiniLcmApi.cs
Switched GetPartsOfSpeech() to source items from Cache.LangProject.AllPartsOfSpeech (cast to IPartOfSpeech); kept ordering by Name.BestAnalysisAlternative.Text, async conversion, and mapping via FromLcmPartOfSpeech.
Test teardown cleanup
backend/FwLite/FwLiteProjectSync.Tests/SyncTests.cs
DisposeAsync augmented to iterate and delete all PartOfSpeech items from FwDataApi and to fetch (ToArrayAsync) and delete all PartOfSpeech items from CrdtApi.
New unit test
backend/FwLite/FwDataMiniLcmBridge.Tests/MiniLcmTests/PartOfSpeechTests.cs
Added GetPartsOfSpeech_DoesNotReturnReversalIndexPos() test that creates a reversal-index POS, calls GetPartsOfSpeech(), and asserts the reversal-index POS is excluded.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Verify the cast to IPartOfSpeech is safe for all entries in Cache.LangProject.AllPartsOfSpeech.
  • Confirm ordering and mapping behavior match previous results from PartOfSpeechRepository.AllInstances().
  • Check test teardown properly removes items and handles async disposal without leaving dangling test data.
  • Review the new test for correct setup/teardown and that it accurately asserts exclusion of reversal-index POS.

Suggested reviewers

  • imnasnainaec

Poem

🐰
I hop through caches soft and deep,
I fetch the words that silence keeps.
I tidy tests, remove the traces,
And leave no crumbs in hidden places. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive The pull request description is related to the changeset but is very vague and lacks meaningful detail about the implementation. Provide more specific details about what changes were made, which files were modified, and how the solution ensures only 'main' parts of speech are returned.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Only use 'main' Parts of speech. Like FLEx.' clearly and specifically describes the main change: filtering parts of speech to exclude non-main types like reversal index POS, aligning behavior with FLEx.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch only-use-main-parts-of-speech

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Oct 29, 2025

UI unit Tests

  1 files  ±0   45 suites  ±0   19s ⏱️ ±0s
111 tests ±0  111 ✅ ±0  0 💤 ±0  0 ❌ ±0 
160 runs  ±0  160 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit c552964. ± Comparison against base commit 846d917.

♻️ This comment has been updated with latest results.

@argos-ci
Copy link

argos-ci bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Nov 11, 2025, 11:23 AM

@myieye
Copy link
Collaborator Author

myieye commented Nov 3, 2025

Note, for some reason this change found what I consider to be a bug in our fwdata api (or maybe even LibLcm?).
Without deleting parts of speech after each test run, a duplicate pos started being returned from FwData's GetPartsOfSpeech.
#1931 (comment)

@myieye myieye marked this pull request as ready for review November 3, 2025 15:09
@myieye
Copy link
Collaborator Author

myieye commented Nov 3, 2025

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Nov 3, 2025

✅ Actions performed

Full review triggered.

@myieye myieye marked this pull request as draft November 5, 2025 16:29
@myieye myieye force-pushed the only-use-main-parts-of-speech branch from 5f83837 to c552964 Compare November 11, 2025 11:20
@myieye myieye marked this pull request as ready for review November 11, 2025 11:42
@myieye
Copy link
Collaborator Author

myieye commented Nov 11, 2025

@coderabbitai full review

@myieye myieye requested a review from Copilot November 11, 2025 11:43
@coderabbitai
Copy link

coderabbitai bot commented Nov 11, 2025

✅ Actions performed

Full review triggered.

Copilot finished reviewing on behalf of myieye November 11, 2025 11:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the GetPartsOfSpeech() method to only return 'main' parts of speech (like FLEx does), excluding reversal index parts of speech. This change ensures consistency with how FLEx handles parts of speech.

Key changes:

  • Changed the data source from PartOfSpeechRepository.AllInstances() to Cache.LangProject.AllPartsOfSpeech to filter out reversal index POS
  • Added a test to verify that reversal index parts of speech are excluded
  • Added cleanup of parts of speech in SyncTests.DisposeAsync() to maintain test isolation

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
FwDataMiniLcmApi.cs Modified GetPartsOfSpeech() to use Cache.LangProject.AllPartsOfSpeech instead of PartOfSpeechRepository.AllInstances()
PartOfSpeechTests.cs Added test to verify reversal index POS are not returned by GetPartsOfSpeech()
SyncTests.cs Added cleanup logic in DisposeAsync() to delete parts of speech created during tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, in other news I thought I'd reviewed this ages ago...

@myieye myieye merged commit 589a34b into develop Nov 19, 2025
25 checks passed
@myieye myieye deleted the only-use-main-parts-of-speech branch November 19, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants